package com.ea.common.enums;

/**
 * @author NAME-L
 * @Description 操作结果枚举类
 * @className OperationResultCode
 * @date 2022-12-08 00:04:13
 */
public enum OperationResultCode {
    // -------------------------------- 系统异常 -------------------------------- //
    PARAMETER_ERROR(ResponseStatusEnums.DO_FAILED.getCode(), "参数异常"),

    SYSTEM_ERROR(ResponseStatusEnums.ERROR.getCode(), "系统操作异常"),

    SYSTEM_RECORD_GOODS_SALES(ResponseStatusEnums.DO_FAILED.getCode(), "系统记录货品销量异常"),

    AUTH_FORBID(ResponseStatusEnums.FORBIDDEN.getCode(), "当前模块暂无权限操作！"),

    // -------------------------------- 账号相关 -------------------------------- //
    ACCOUNT_NOT_EXISTS(ResponseStatusEnums.DO_FAILED.getCode(), "该账号不存在！"),

    ACCOUNT_STATUS_IS_ABNORMAL(ResponseStatusEnums.DO_FAILED.getCode(), "当前账号“%s”状态异常，请联系管理员处理"),

    ACCOUNT_PASSWORD_ERROR(ResponseStatusEnums.DO_FAILED.getCode(), "账号密码错误，请重新输入"),

    ACCOUNT_IS_FORBIDDEN(ResponseStatusEnums.DO_FAILED.getCode(), "今日密码输入错误次数过多，10分钟内禁止登录，请10分钟后再试!"),

    ACCOUNT_IS_EXISTS(ResponseStatusEnums.DO_FAILED.getCode(), "该账号已存在，无法注册"),

    ACCOUNT_UPDATE_FROBIDDEN(ResponseStatusEnums.DO_FAILED.getCode(), "该账号为“%s”状态，无法修改！"),

    ACCOUNT_CHANGE_PASSWORD_FORBIDDEN(ResponseStatusEnums.DO_FAILED.getCode(), "无权限修改该账号密码，请联系管理员！"),

    ACCOUNT_PHONE_IS_BE_REGISTER(ResponseStatusEnums.DO_FAILED.getCode(), "该手机号已被绑定，无法注册，请重新输入！"),

    // -------------------------------- 物流相关 -------------------------------- //
    LOGISTIC_CREATE_ERROR(ResponseStatusEnums.DO_FAILED.getCode(),"创建物流单流程异常"),

    LOGISTIC_NO_EXISTS(ResponseStatusEnums.DO_FAILED.getCode(),"物流单信息不存在"),

    LOGISTIC_NO_MAP_TO_ORDER(ResponseStatusEnums.DO_FAILED.getCode() , "该物流单不存在对应的订单信息"),

    // -------------------------------- 货品相关 -------------------------------- //
    CREATE_GOODS_PARAMETER_ERROR(ResponseStatusEnums.DO_FAILED.getCode(), "新建货品参数有误，请重新输入后再试"),

    GOODS_IS_BLOCK_UP(ResponseStatusEnums.DO_FAILED.getCode() ,"该货品已停用，无法修改货品信息，请将货品启用后重试修改"),

    CREATE_SKU_INFO_ERROR(ResponseStatusEnums.DO_FAILED.getCode(), "添加货品规格失败，请重试！"),

    NEED_UPDATE_GOODS_SKU_INFO(ResponseStatusEnums.DO_FAILED.getCode(), "规格编号为 “%s” 的货品规格未完善货品规格信息，无法修改状态"),

    GOODS_NO_EXISTS(ResponseStatusEnums.DO_FAILED.getCode(), "货品编号为 “%s” 的货品不存在！"),

    GOODS_SKU_NO_NOT_EXISTS(ResponseStatusEnums.DO_FAILED.getCode(),"规格编号为 “%s” 的货品规格不存在！"),

    GOODS_HAS_NO_SKU(ResponseStatusEnums.DO_FAILED.getCode(),"货品编号：“%s” 下不存在规格货品！"),

    GOODS_HAS_NO_SKU_PUT_WAY(ResponseStatusEnums.DO_FAILED.getCode(),"货品编号：“%s” ,不存在已上架的规格货品，请上架规格货品后修改当前货品上架状态！"),



    // -------------------------------- 订单相关 -------------------------------- //
    ORDER_STATUS_FORBID(ResponseStatusEnums.DO_FAILED.getCode(),"订单:“%s”状态为 “%s”，无法修改订单信息"),

    ORDER_NOT_EXISTS(ResponseStatusEnums.DO_FAILED.getCode(),"订单不存在，请重试！"),

    ORDER_GOODS_IS_NULL(ResponseStatusEnums.DO_FAILED.getCode(), "订单货品为空，无法创建订单"),

    ORDER_GOODS_IS_BLOCK_UP(ResponseStatusEnums.DO_FAILED.getCode(), "货品“%s”已停用，无法购买"),

    ORDER_GOODS_LOW_STOCK(ResponseStatusEnums.DO_FAILED.getCode(), "该货品“%s”已被售罄，请尝试选择其他货品购买！"),

    ORDER_CONFIRM_FORBID(ResponseStatusEnums.DO_FAILED.getCode(), "订单确认收货失败，请联系管理员！"),

    ORDER_CHANGE_BUYER_MEMO(ResponseStatusEnums.DO_FAILED.getCode(), "订单修改备注失败，请联系管理员！"),


    // -------------------------------- 购物车相关 -------------------------------- //
    ADD_CART_ERROR(ResponseStatusEnums.DO_FAILED.getCode() , "添加购物车异常"),

    CART_ADD_GOODS_AMOUNT_ERROR(ResponseStatusEnums.DO_FAILED.getCode() , "购物车修改货品数量异常"),

    // -------------------------------- 系统配置相关 -------------------------------- //
    SYS_CONFIG_ERROR(ResponseStatusEnums.ERROR.getCode() , "系统配置“%s”失效，请重新保存配置后再试"),

    SYS_CONFIG_STOCK_NEGATIVE(ResponseStatusEnums.DO_FAILED.getCode(),"货品禁止负库存出库！"),

    SYS_BASE_DIC_EXISTS(ResponseStatusEnums.DO_FAILED.getCode(),"该数据字典参数已存在，无法添加！"),

    SYS_BASE_DIC_UPDATE_ERROR(ResponseStatusEnums.DO_FAILED.getCode(),"数据字典更新失败！"),

    SYS_BASE_DIC_IS_SYSTEM(ResponseStatusEnums.DO_FAILED.getCode(),"该数据字典为系统字段，禁止修改或删除！"),


    ;


    private String code;

    private String msg;

    public String getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }

    OperationResultCode(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }
}
